3.3.60 \(\int \frac {1}{a x+b x^{1-n}} \, dx\)

Optimal. Leaf size=15 \[ \frac {\log \left (a x^n+b\right )}{a n} \]

________________________________________________________________________________________

Rubi [A]  time = 0.01, antiderivative size = 15, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {1593, 260} \begin {gather*} \frac {\log \left (a x^n+b\right )}{a n} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a*x + b*x^(1 - n))^(-1),x]

[Out]

Log[b + a*x^n]/(a*n)

Rule 260

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rule 1593

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^(q - p))^n, x] /; F
reeQ[{a, b, p, q}, x] && IntegerQ[n] && PosQ[q - p]

Rubi steps

\begin {align*} \int \frac {1}{a x+b x^{1-n}} \, dx &=\int \frac {x^{-1+n}}{b+a x^n} \, dx\\ &=\frac {\log \left (b+a x^n\right )}{a n}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.00, size = 15, normalized size = 1.00 \begin {gather*} \frac {\log \left (a x^n+b\right )}{a n} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a*x + b*x^(1 - n))^(-1),x]

[Out]

Log[b + a*x^n]/(a*n)

________________________________________________________________________________________

IntegrateAlgebraic [A]  time = 0.03, size = 18, normalized size = 1.20 \begin {gather*} \frac {\log \left (a n x^n+b n\right )}{a n} \end {gather*}

Antiderivative was successfully verified.

[In]

IntegrateAlgebraic[(a*x + b*x^(1 - n))^(-1),x]

[Out]

Log[b*n + a*n*x^n]/(a*n)

________________________________________________________________________________________

fricas [A]  time = 0.42, size = 28, normalized size = 1.87 \begin {gather*} \frac {{\left (n - 1\right )} \log \relax (x) + \log \left (a x + b x^{-n + 1}\right )}{a n} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a*x+b*x^(1-n)),x, algorithm="fricas")

[Out]

((n - 1)*log(x) + log(a*x + b*x^(-n + 1)))/(a*n)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {1}{a x + b x^{-n + 1}}\,{d x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a*x+b*x^(1-n)),x, algorithm="giac")

[Out]

integrate(1/(a*x + b*x^(-n + 1)), x)

________________________________________________________________________________________

maple [B]  time = 0.06, size = 41, normalized size = 2.73 \begin {gather*} \frac {\ln \relax (x )}{a}-\frac {\ln \relax (x )}{a n}+\frac {\ln \left (a x +b \,{\mathrm e}^{\left (-n +1\right ) \ln \relax (x )}\right )}{a n} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(a*x+b*x^(-n+1)),x)

[Out]

1/a*ln(x)-1/a/n*ln(x)+1/a/n*ln(a*x+b*exp((-n+1)*ln(x)))

________________________________________________________________________________________

maxima [A]  time = 1.37, size = 19, normalized size = 1.27 \begin {gather*} \frac {\log \left (\frac {a x^{n} + b}{a}\right )}{a n} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a*x+b*x^(1-n)),x, algorithm="maxima")

[Out]

log((a*x^n + b)/a)/(a*n)

________________________________________________________________________________________

mupad [B]  time = 5.22, size = 34, normalized size = 2.27 \begin {gather*} \frac {\ln \left (a\,x+b\,x^{1-n}\right )}{a\,n}+\frac {\ln \relax (x)\,\left (n-1\right )}{a\,n} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(a*x + b*x^(1 - n)),x)

[Out]

log(a*x + b*x^(1 - n))/(a*n) + (log(x)*(n - 1))/(a*n)

________________________________________________________________________________________

sympy [A]  time = 2.14, size = 39, normalized size = 2.60 \begin {gather*} \begin {cases} \tilde {\infty } \log {\relax (x )} & \text {for}\: a = 0 \wedge b = 0 \wedge n = 0 \\\frac {\log {\relax (x )}}{a + b} & \text {for}\: n = 0 \\\frac {x^{n}}{b n} & \text {for}\: a = 0 \\\frac {\log {\relax (x )}}{a} & \text {for}\: b = 0 \\\frac {\log {\relax (x )}}{a} + \frac {\log {\left (\frac {a}{b} + x^{- n} \right )}}{a n} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a*x+b*x**(1-n)),x)

[Out]

Piecewise((zoo*log(x), Eq(a, 0) & Eq(b, 0) & Eq(n, 0)), (log(x)/(a + b), Eq(n, 0)), (x**n/(b*n), Eq(a, 0)), (l
og(x)/a, Eq(b, 0)), (log(x)/a + log(a/b + x**(-n))/(a*n), True))

________________________________________________________________________________________